<template>
  <UniversalContainer name="默认Radio" :paramaters="type">
    <Radio v-model:value="radio" label="1" @change="testFn">Vue</Radio>
    <Radio v-model:value="radio" label="2" @change="testFn">React</Radio>
    <Radio v-model:value="radio" label="3" @change="testFn">TypeScript</Radio>
    <Radio v-model:value="radio" label="4" @change="testFn">Node </Radio>
  </UniversalContainer>
</template>

<script setup lang="ts">
import { ref } from "vue";
import Radio from "../../baseComponent/Radio.vue";
import UniversalContainer from "../UniversalContainer.vue";
const radio = ref("1");
const type = ref(
  `
    import Radio from "../../baseComponent/Radio.vue";
    
    <Radio v-model:value="radio" label="1" @change="testFn">Vue</Radio>
    <Radio v-model:value="radio" label="2" @change="testFn">React</Radio>
    <Radio v-model:value="radio" label="3" @change="testFn">TypeScript</Radio>
    <Radio v-model:value="radio" label="4" @change="testFn">Node </Radio>
    
    
    const testFn = (a: any) => {
      radio.value = a;
    };
  `
);

const testFn = (a: any) => {
  radio.value = a;
};
</script>

<style scoped></style>
